export default [
  {
    path: '/login',
    component: '../layouts/UserLayout',
    routes: [
      {
        name: 'login',
        path: '/login',
        component: './Login',
      },
    ],
  },
  {
    path: '/',
    redirect: '/selfquery',
  },
  {
    path: '/',
    component: '../layouts/SecurityLayout',
    routes: [
      {
        path: '/project/:projectId/portal/:portalId/board/:boardId/design',
        component: '../pages/Analysis/Board/Design',
      },
      {
        component: '../layouts/BasicLayout',
        authority: ['admin', 'user'],
        routes: [
          {
            path: '/selfquery',
            name: 'selfquery',
            icon: 'search',
            component: '@/pages/SelfQuery',
            routes: [
              { path: '/selfquery', component: './SelfQuery/Subscribe'},
              { path: '/selfquery/subscribe', component: './SelfQuery/Subscribe', exact: true },
              { path: '/selfquery/panel', component: './SelfQuery/Panel', exact: true },
              { path: '/selfquery/index', component: './SelfQuery/IndexLibrary', exact: true },
              { component: './404', }
            ],
          },
          {
            name: 'analysis',
            icon: 'FundOutlined',
            path: '/analysis',
            component: '@/pages/Analysis',
            routes: [
              { path: '/analysis/:id?', component: './Analysis',props:true},
            ],
          },
          // {
          //   name: 'design',
          //   icon: 'FundOutlined',
          //   path: '/design',
          //   component: '@/pages/Design',
          //   routes: [
          //     { path: '/design/:id?', component: './Design',props:true},
          //   ],
          // },
          {
            name: 'information',
            icon: 'user',
            path: '/information',
            component: '@/pages/Information',
            routes: [
              { path: '/information', component: './Information/UserList'},
              { path: '/information/user', component: './Information/UserList', exact: true },
              { path: '/information/role', component: './Information/RoleList', exact: true },
              { path: '/information/organize', component: './Information/OrganizeList', exact: true },
              { path: '/information/authority', component: './Information/TemporaryAuthority', exact: true },
              { path: '/information/project', component: './Information/ManagementList', exact: true },
              { path: '/information/data', component: './Information/DataList', exact: true },
              { component: './404', }
            ],
          },
          {
            component: './404',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    component: './404',
  },
];
